using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
#if UNITY_EDITOR
using UnityEditor;
#endif

public class TitleScreenUIHandler : MonoBehaviour
{
    [SerializeField]private HowToPlayDialog howToPlayDialog;
    [SerializeField]private SettingDialog settingDialog;
    // Start is called before the first frame update
    
    public void StartButtonClicked()
    {
        SceneManager.LoadScene(1);
    }
    public void HowToPlayButtonClicked()
    {
        DialogBase dialog=Instantiate(howToPlayDialog);
        dialog.OpenDialog();
    }

    public void SettingButtonClicked()
    {
        DialogBase dialog=Instantiate(settingDialog);
        dialog.OpenDialog();
    }

    public void ExitButtonClicked()
    {
#if UNITY_EDITOR
        EditorApplication.ExitPlaymode();
#else
        Application.Quit();
#endif
    }
}
